<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Space Game Engine: S:/Code/space/src/spaceEngine/space/types/space_vector.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Space Game Engine
   &#160;<span id="projectnumber">0.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.2 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('space__vector_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">space_vector.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="space__vector_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/**********************************************************************************************/</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &lt;math.h&gt;</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &lt;irrlicht.h&gt;</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;</div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="keyword">namespace </span>space {</div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;</div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;    <span class="comment">/**********************************************************************************************/</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"><a class="code" href="classspace_1_1space__vector.html">   23</a></span>&#160;    <span class="keyword">class </span><a class="code" href="classspace_1_1space__vector.html" title="Space vector.">space_vector</a> : <span class="keyword">public</span> physx::PxVec3 {</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    <span class="keyword">public</span>:</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;        <span class="comment">// Data</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;        <span class="comment">// </span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;        <span class="keywordtype">float</span> x;</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;        <span class="keywordtype">float</span> y;</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;        <span class="keywordtype">float</span> z; </div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;        <span class="comment">// Constructors/Destructors. </span></div>
<div class="line"><a name="l00032"></a><span class="lineno"><a class="code" href="classspace_1_1space__vector.html#a3e8bfb9bc232e495407cafceffb66f87">   32</a></span>&#160;        <a class="code" href="classspace_1_1space__vector.html#a3e8bfb9bc232e495407cafceffb66f87">space_vector</a>() { </div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;            x=0;</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;            y=0;</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;            z=0;</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;        }</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;        <a class="code" href="classspace_1_1space__vector.html#a3e8bfb9bc232e495407cafceffb66f87">space_vector</a>(<span class="keywordtype">float</span> in_x, <span class="keywordtype">float</span> in_y) { </div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;            x=in_x;</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;            y=in_y;</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;            z=0; </div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        }</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;        <a class="code" href="classspace_1_1space__vector.html#a3e8bfb9bc232e495407cafceffb66f87">space_vector</a>(<span class="keywordtype">float</span> in_x, <span class="keywordtype">float</span> in_y, <span class="keywordtype">float</span> in_z) { </div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;            x=in_x;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;            y=in_y;</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;            z=in_z; </div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;        }</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;        <span class="comment">/**********************************************************************************************/</span></div>
<div class="line"><a name="l00063"></a><span class="lineno"><a class="code" href="classspace_1_1space__vector.html#a046f124adda31e66c663b2fc2923acdc">   63</a></span>&#160;        <a class="code" href="classspace_1_1space__vector.html" title="Space vector.">space_vector</a> &amp; <a class="code" href="classspace_1_1space__vector.html#a046f124adda31e66c663b2fc2923acdc" title="Assignment operator.">operator=</a>(<span class="keyword">const</span> <a class="code" href="classspace_1_1space__vector.html" title="Space vector.">space_vector</a> &amp;o) { </div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;            x = o.x; </div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;            y = o.y; </div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;            z = o.z; </div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;            <span class="keywordflow">return</span> *<span class="keyword">this</span>; </div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;        }</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;        <a class="code" href="classspace_1_1space__vector.html#a3e8bfb9bc232e495407cafceffb66f87">space_vector</a>(<span class="keyword">const</span> <a class="code" href="classspace_1_1space__vector.html" title="Space vector.">space_vector</a> &amp;o) { </div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;            x = o.x; </div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;            y = o.y; </div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;            z = o.z; </div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;        }</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;        <span class="comment">/**********************************************************************************************/</span></div>
<div class="line"><a name="l00088"></a><span class="lineno"><a class="code" href="classspace_1_1space__vector.html#abc48b6785752b9ebfa7bddb57546b534">   88</a></span>&#160;        <a class="code" href="classspace_1_1space__vector.html" title="Space vector.">space_vector</a> &amp; <a class="code" href="classspace_1_1space__vector.html#abc48b6785752b9ebfa7bddb57546b534" title="copy constructors (including from other types)">operator=</a>(<span class="keyword">const</span> physx::PxVec2 &amp; o) { </div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;            <a class="code" href="classspace_1_1space__vector.html#a6f852e6574e09ba06212dbf07327f6cd" title="Copies the given vector.">copy</a>(o);</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;            <span class="keywordflow">return</span> *<span class="keyword">this</span>; </div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;        }</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;        <a class="code" href="classspace_1_1space__vector.html" title="Space vector.">space_vector</a> &amp; <a class="code" href="classspace_1_1space__vector.html#a046f124adda31e66c663b2fc2923acdc" title="Assignment operator.">operator=</a>(<span class="keyword">const</span> physx::PxVec3 &amp; o) { </div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;            <a class="code" href="classspace_1_1space__vector.html#a6f852e6574e09ba06212dbf07327f6cd" title="Copies the given vector.">copy</a>(o);</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;            <span class="keywordflow">return</span> *<span class="keyword">this</span>; </div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;        }</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        <span class="comment">/**********************************************************************************************/</span></div>
<div class="line"><a name="l00108"></a><span class="lineno"><a class="code" href="classspace_1_1space__vector.html#ad9edef2a6a8a89ef844c37614f5264a1">  108</a></span>&#160;        <a class="code" href="classspace_1_1space__vector.html#ad9edef2a6a8a89ef844c37614f5264a1" title="Constructor.">space_vector</a>(<span class="keyword">const</span> physx::PxVec2 &amp;o) { </div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;            <a class="code" href="classspace_1_1space__vector.html#a6f852e6574e09ba06212dbf07327f6cd" title="Copies the given vector.">copy</a>(o);</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;        }</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        <a class="code" href="classspace_1_1space__vector.html#a3e8bfb9bc232e495407cafceffb66f87">space_vector</a>(<span class="keyword">const</span> physx::PxVec3 &amp;o) { </div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;            <a class="code" href="classspace_1_1space__vector.html#a6f852e6574e09ba06212dbf07327f6cd" title="Copies the given vector.">copy</a>(o);</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        }</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;        <span class="comment">/**********************************************************************************************/</span></div>
<div class="line"><a name="l00128"></a><span class="lineno"><a class="code" href="classspace_1_1space__vector.html#a9abee8033f67864cd4d1537156d2a16d">  128</a></span>&#160;        <a class="code" href="classspace_1_1space__vector.html" title="Space vector.">space_vector</a> &amp; <a class="code" href="classspace_1_1space__vector.html#a9abee8033f67864cd4d1537156d2a16d" title="Assignment operator.">operator=</a>(<span class="keyword">const</span> irr::core::vector2df &amp; o) { </div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;            <a class="code" href="classspace_1_1space__vector.html#a6f852e6574e09ba06212dbf07327f6cd" title="Copies the given vector.">copy</a>(o);</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;            <span class="keywordflow">return</span> *<span class="keyword">this</span>; </div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;        }</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;        <a class="code" href="classspace_1_1space__vector.html" title="Space vector.">space_vector</a> &amp; <a class="code" href="classspace_1_1space__vector.html#a046f124adda31e66c663b2fc2923acdc" title="Assignment operator.">operator=</a>(<span class="keyword">const</span> irr::core::vector3df &amp; o) { </div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;            <a class="code" href="classspace_1_1space__vector.html#a6f852e6574e09ba06212dbf07327f6cd" title="Copies the given vector.">copy</a>(o);</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;            <span class="keywordflow">return</span> *<span class="keyword">this</span>; </div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;        }</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;        <span class="comment">/**********************************************************************************************/</span></div>
<div class="line"><a name="l00148"></a><span class="lineno"><a class="code" href="classspace_1_1space__vector.html#a0d3e7f557e8d747145624f5958a09f60">  148</a></span>&#160;        <a class="code" href="classspace_1_1space__vector.html#a0d3e7f557e8d747145624f5958a09f60" title="Constructor.">space_vector</a>(<span class="keyword">const</span> irr::core::vector2df &amp;o) { </div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;            <a class="code" href="classspace_1_1space__vector.html#a6f852e6574e09ba06212dbf07327f6cd" title="Copies the given vector.">copy</a>(o);</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;        }</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;        <a class="code" href="classspace_1_1space__vector.html#a3e8bfb9bc232e495407cafceffb66f87">space_vector</a>(<span class="keyword">const</span> irr::core::vector3df &amp;o) { </div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;            <a class="code" href="classspace_1_1space__vector.html#a6f852e6574e09ba06212dbf07327f6cd" title="Copies the given vector.">copy</a>(o);</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;        }</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;        <span class="comment">/**********************************************************************************************/</span></div>
<div class="line"><a name="l00166"></a><span class="lineno"><a class="code" href="classspace_1_1space__vector.html#a6f852e6574e09ba06212dbf07327f6cd">  166</a></span>&#160;        <span class="keywordtype">void</span> <a class="code" href="classspace_1_1space__vector.html#a6f852e6574e09ba06212dbf07327f6cd" title="Copies the given vector.">copy</a>(irr::core::vector3df &amp;o) { </div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;            o.X = x;</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;            o.Y = y;</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;            o.Z = z;</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;        }</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="classspace_1_1space__vector.html#a6f852e6574e09ba06212dbf07327f6cd" title="Copies the given vector.">copy</a>(<span class="keyword">const</span> irr::core::vector3df &amp;o) { </div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;            x = o.X;</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;            y = o.Y; </div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;            z = o.Z; </div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;        }</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;        <span class="comment">/**********************************************************************************************/</span></div>
<div class="line"><a name="l00188"></a><span class="lineno"><a class="code" href="classspace_1_1space__vector.html#ac998bfd582b51b9a25d11e261c84b8ee">  188</a></span>&#160;        <span class="keywordtype">void</span> <a class="code" href="classspace_1_1space__vector.html#ac998bfd582b51b9a25d11e261c84b8ee" title="Copies the given vector.">copy</a>(irr::core::vector2df &amp;o) { </div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;            o.X = x;</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;            o.Y = y;</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;        }</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="classspace_1_1space__vector.html#a6f852e6574e09ba06212dbf07327f6cd" title="Copies the given vector.">copy</a>(<span class="keyword">const</span> irr::core::vector2df &amp;o) { </div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;            x = o.X;</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;            y = o.Y; </div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;            z = 0;</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        }</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;        <span class="comment">/**********************************************************************************************/</span></div>
<div class="line"><a name="l00209"></a><span class="lineno"><a class="code" href="classspace_1_1space__vector.html#ac22bdb7abd8109cbc8b0bc0a6d464166">  209</a></span>&#160;        <span class="keywordtype">void</span> <a class="code" href="classspace_1_1space__vector.html#ac22bdb7abd8109cbc8b0bc0a6d464166" title="Copies the given vector.">copy</a>(physx::PxVec3 &amp;o) { </div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;            o.x = x;</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;            o.y = y;</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;        }</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="classspace_1_1space__vector.html#a6f852e6574e09ba06212dbf07327f6cd" title="Copies the given vector.">copy</a>(<span class="keyword">const</span> physx::PxVec3 &amp;o) { </div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;            x = o.x;</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;            y = o.y; </div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;            z = o.z; </div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;        }</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;        <span class="comment">/**********************************************************************************************/</span></div>
<div class="line"><a name="l00230"></a><span class="lineno"><a class="code" href="classspace_1_1space__vector.html#aac04d52eec768096f1087dff35da256f">  230</a></span>&#160;        <span class="keywordtype">void</span> <a class="code" href="classspace_1_1space__vector.html#aac04d52eec768096f1087dff35da256f" title="Copies the given vector.">copy</a>(physx::PxVec2  &amp;o) { </div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;            o.x = x;</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;            o.y = y;</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;        }</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="classspace_1_1space__vector.html#a6f852e6574e09ba06212dbf07327f6cd" title="Copies the given vector.">copy</a>(<span class="keyword">const</span> physx::PxVec2  &amp;o) { </div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;            x = o.x;</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;            y = o.y; </div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;            z = 0;</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;        }</div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;</div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;        <span class="comment">/**********************************************************************************************/</span></div>
<div class="line"><a name="l00251"></a><span class="lineno"><a class="code" href="classspace_1_1space__vector.html#aa6b306c312c18b3f78ebd490f6737714">  251</a></span>&#160;        <span class="keyword">const</span> irr::core::vector3df <a class="code" href="classspace_1_1space__vector.html#aa6b306c312c18b3f78ebd490f6737714" title="Gets the irr vector.">irr_vector</a>() {</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;            <span class="keywordflow">return</span> irr::core::vector3df(x,y,z);</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;        }</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;        <span class="keyword">const</span> physx::PxVec3 &amp; physx_vector() {</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;            <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;        }</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;        <span class="comment">/**********************************************************************************************/</span></div>
<div class="line"><a name="l00271"></a><span class="lineno"><a class="code" href="classspace_1_1space__vector.html#a6da79e1ae5578d2a8a690090661fbf10">  271</a></span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="classspace_1_1space__vector.html#a6da79e1ae5578d2a8a690090661fbf10" title="Equality operator.">operator== </a>(<span class="keyword">const</span> <a class="code" href="classspace_1_1space__vector.html" title="Space vector.">space_vector</a>&amp; rhs )<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;            <span class="keywordflow">if</span>(x == rhs.x &amp;&amp; y == rhs.y &amp;&amp; z == rhs.z)</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;                <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;            <span class="keywordflow">else</span></div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;                <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;        }</div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;        <span class="comment">//</span></div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;        <span class="comment">// math functions</span></div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;        <span class="comment">//</span></div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;        <span class="keyword">const</span> __inline <a class="code" href="classspace_1_1space__vector.html" title="Space vector.">space_vector</a> operator+(<a class="code" href="classspace_1_1space__vector.html" title="Space vector.">space_vector</a> v) {</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="classspace_1_1space__vector.html#a3e8bfb9bc232e495407cafceffb66f87">space_vector</a>((x + v.x), (y + v.y), (z + v.z));</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;        }</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;        <span class="comment">/**********************************************************************************************/</span></div>
<div class="line"><a name="l00298"></a><span class="lineno"><a class="code" href="classspace_1_1space__vector.html#a4fa3c70dd75652c1728fad7bec991bc3">  298</a></span>&#160;        <span class="keyword">const</span> __inline <a class="code" href="classspace_1_1space__vector.html" title="Space vector.">space_vector</a> <a class="code" href="classspace_1_1space__vector.html#a4fa3c70dd75652c1728fad7bec991bc3" title="Negation operator.">operator-</a>(<a class="code" href="classspace_1_1space__vector.html" title="Space vector.">space_vector</a> v) {</div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="classspace_1_1space__vector.html#a3e8bfb9bc232e495407cafceffb66f87">space_vector</a>((x - v.x), (y - v.y), (z - v.z));</div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;        }</div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;</div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;        <span class="keyword">const</span> __inline <a class="code" href="classspace_1_1space__vector.html" title="Space vector.">space_vector</a> operator*(<span class="keywordtype">float</span> w) {</div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="classspace_1_1space__vector.html#a3e8bfb9bc232e495407cafceffb66f87">space_vector</a>((x * w), (y * w), (z * w));</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;        }</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;</div>
<div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;        <span class="comment">/**********************************************************************************************/</span></div>
<div class="line"><a name="l00319"></a><span class="lineno"><a class="code" href="classspace_1_1space__vector.html#a0295ca0dc786dd8b0f9546de85c19239">  319</a></span>&#160;        <span class="keyword">const</span> __inline <a class="code" href="classspace_1_1space__vector.html" title="Space vector.">space_vector</a> <a class="code" href="classspace_1_1space__vector.html#a0295ca0dc786dd8b0f9546de85c19239" title="Division operator.">operator/</a>(<span class="keywordtype">float</span> w) {</div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="classspace_1_1space__vector.html#a3e8bfb9bc232e495407cafceffb66f87">space_vector</a>((x / w), (y / w), (z / w));</div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;        }</div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;        <span class="keyword">const</span> __inline <span class="keywordtype">float</span> length() {</div>
<div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;            <span class="keywordflow">return</span> sqrt((x * x) + (y * y) + (z * z));</div>
<div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;        }</div>
<div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;</div>
<div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;        <span class="comment">/**********************************************************************************************/</span></div>
<div class="line"><a name="l00340"></a><span class="lineno"><a class="code" href="classspace_1_1space__vector.html#afe73f306015c97332880a3bdce9f43ee">  340</a></span>&#160;        <span class="keyword">const</span> __inline <span class="keywordtype">float</span> <a class="code" href="classspace_1_1space__vector.html#afe73f306015c97332880a3bdce9f43ee" title="Distances.">distance</a>(<a class="code" href="classspace_1_1space__vector.html" title="Space vector.">space_vector</a> a, <a class="code" href="classspace_1_1space__vector.html" title="Space vector.">space_vector</a> b) {</div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;            <a class="code" href="classspace_1_1space__vector.html" title="Space vector.">space_vector</a> lineVector;</div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;            lineVector = a - b;</div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;            <span class="keywordflow">return</span> lineVector.length();</div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;        }</div>
<div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;        <span class="keyword">const</span> __inline <span class="keywordtype">float</span> <a class="code" href="classspace_1_1space__vector.html#afe73f306015c97332880a3bdce9f43ee" title="Distances.">distance</a>(<a class="code" href="classspace_1_1space__vector.html" title="Space vector.">space_vector</a> a) {</div>
<div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;            <a class="code" href="classspace_1_1space__vector.html" title="Space vector.">space_vector</a> lineVector;</div>
<div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;            lineVector.x = x - a.x;</div>
<div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;            lineVector.y = y - a.y;</div>
<div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;            lineVector.z = z - a.z;</div>
<div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;</div>
<div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;            <span class="keywordflow">return</span> lineVector.length();</div>
<div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;        }</div>
<div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;</div>
<div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;        <span class="comment">/**********************************************************************************************/</span></div>
<div class="line"><a name="l00365"></a><span class="lineno"><a class="code" href="classspace_1_1space__vector.html#ac500c7abe016fdae4c1d54f844b748f3">  365</a></span>&#160;        <span class="keyword">const</span> __inline <a class="code" href="classspace_1_1space__vector.html" title="Space vector.">space_vector</a> <a class="code" href="classspace_1_1space__vector.html#ac500c7abe016fdae4c1d54f844b748f3" title="extended functionality from irrlicht.">horizontal_angle</a>() { <span class="keywordflow">return</span> <a class="code" href="classspace_1_1space__vector.html#aa6b306c312c18b3f78ebd490f6737714" title="Gets the irr vector.">irr_vector</a>().getHorizontalAngle(); }</div>
<div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;        <span class="keyword">const</span> __inline <a class="code" href="classspace_1_1space__vector.html" title="Space vector.">space_vector</a> spherical_angles() { <span class="keywordflow">return</span> <a class="code" href="classspace_1_1space__vector.html#aa6b306c312c18b3f78ebd490f6737714" title="Gets the irr vector.">irr_vector</a>().getSphericalCoordinateAngles(); }</div>
<div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;</div>
<div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;        <span class="comment">/**********************************************************************************************/</span></div>
<div class="line"><a name="l00381"></a><span class="lineno"><a class="code" href="classspace_1_1space__vector.html#af9b7ec24d021605a76eca935e1b2ec2e">  381</a></span>&#160;        <span class="keyword">const</span> __inline <span class="keywordtype">float</span> <a class="code" href="classspace_1_1space__vector.html#af9b7ec24d021605a76eca935e1b2ec2e" title="Length squared.">length_squared</a>(<span class="keyword">const</span> <a class="code" href="classspace_1_1space__vector.html" title="Space vector.">space_vector</a> &amp; v) { <span class="keywordflow">return</span> <a class="code" href="classspace_1_1space__vector.html#aa6b306c312c18b3f78ebd490f6737714" title="Gets the irr vector.">irr_vector</a>().getLengthSQ(); }</div>
<div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;    };</div>
<div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;};</div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_23202700da6505396cadb7380ee4b6c3.html">spaceEngine</a></li><li class="navelem"><a class="el" href="dir_9a77bc21ff72af59ffa53913b2aad45d.html">space</a></li><li class="navelem"><a class="el" href="dir_7e6fa892456a6300c9ed8344e8ff9b6d.html">types</a></li><li class="navelem"><a class="el" href="space__vector_8h.html">space_vector.h</a></li>
    <li class="footer">Generated on Sat Dec 1 2012 12:29:41 for Space Game Engine by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.2 </li>
  </ul>
</div>
</body>
</html>
